import request from "@/api/utils/request.js";

const BASE_URL_PREFIX = "/collection";

export default {
  list: () => {
    return request({
      url: `${BASE_URL_PREFIX}/getCollectionList`,
      method: 'GET',
    })
  },
  save: (data) => {
    return request({
      url: `${BASE_URL_PREFIX}/saveCollection`,
      method: 'POST',
      data: data
    })
  },
  delById: (id) => {
    return request({
      url: `${BASE_URL_PREFIX}/delCollectionById/${id}`,
      method: 'DELETE'
    })
  },
  getRefreshStatus: () => {
    return request({
      url: `${BASE_URL_PREFIX}/getDefaultCollectionRefreshStatus`,
      method: 'GET'
    })
  }
}